//https://www.cnblogs.com/sgs123/p/14171408.html
import debounce from './debounce'
import inputN from './inputN'
import srcollloadmore from './srcollloadmore'
import clickoutside from './clickoutside'
import enternumber from './enternumber'
import focus from './focus'

const directives = {
    debounce, //防抖
    inputN, //input输入正整数
    srcollloadmore,//监听滚动加载
    clickoutside,
    enternumber,//监听键盘 只输入0-9
    focus,
  }
  
export default {
    install(Vue){
      Object.keys(directives).forEach(key=>{
        Vue.directive(key, directives[key])
      })
    }
  }